import jsonschema

def ihrm_jsonschema_util(resp,success,code,message,data):
    schema = {
        "type": "object",
        "properties": {
            success: {"type":"booolean"},
            code: {"type": "integer", "const": 10000},
            message: {"type": "string", "pattern": "操作成功"},
            data: {"type": "string"}
        },
        "required": [success, code, message, data]

    }
    re = jsonschema.validate(instance=resp.json(), schema=schema)
    print(re)
